package main

import "fmt"

/**
 * @author: guangcheng
 * @date:   2020/11/21 20:15
 * @version  V1.0
 * @description:
 *
 */
func main() {

	/**
	sum= 30
	11
	*/
	var i Integer = 10
	i.CalSum(10, 20)

	(&i).Change()
	fmt.Println(i)
}

type Integer int

func (i Integer) CalSum(a Integer, b Integer) {
	fmt.Println("sum=", a+b)
}

func (i *Integer) Change() {
	*i = *i + 1
}
